package com.leoman.dao;

import com.leoman.entity.City;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * 城市
 * Created by Administrator on 2016/10/18 0018 下午 3:01.
 */
public interface CityDao extends JpaRepository<City, Integer>, JpaSpecificationExecutor<City> {

    @Query("select a from City a where a.province.id = ?1")
    List<City> findListByProvinceId(Integer provinceId);
}